/*
 * @Author: sy
 * @Date: 2021-11-16 16:39:01
 * @LastEditTime: 2022-07-18 19:25:34
 * @Description: file content
 */
import layoutHeaderAside from "@/layout/header-aside";

// 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require("@/libs/util.import." + process.env.NODE_ENV);

const meta = { auth: true, cache: true };

export default {
  path: "/",
  name: "home",
  meta: { ...meta, level: 0 },
  redirect: { name: "index" },
  component: layoutHeaderAside,
  children: [
    {
      path: "index",
      name: "index",
      component: _import("system/index"),
      meta: { ...meta, title: "首页" }
    },
    // 刷新页面 必须保留
    {
      path: "refresh",
      name: "refresh",
      hidden: true,
      component: _import("system/function/refresh")
    },
    // 页面重定向 必须保留
    {
      path: "redirect/:route*",
      name: "redirect",
      hidden: true,
      component: _import("system/function/redirect")
    }
  ]
};
